<?php /* Smarty version 2.6.13, created on 2013-10-08 10:02:59
         compiled from Admin/AdvM/advm.html */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'date', 'Admin/AdvM/advm.html', 41, false),)), $this); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<link rel="stylesheet" type="text/css" href="../Public/Css/userp.css" />
<script type="text/javascript" src='../Public/Js/jquery.js'></script>
<script type="text/javascript">
	function showPic(path,showId){
		alert(path);
		alert($("#"+showId));
		$("#"+showId).attr('src',path);
	}
</script>
</head>
<body>
<div class="content">

	<div class="pos">
		<div class="posDe">当前位置 : <font style="color:blue;">广告管理&gt;管理广告</font></div>
	</div>
	<div>
	<div id="advm">
		<table width="900px" >
			<tr><th></th><th>广告编号</th><th>显示位置</th><th>广告标题</th><th>广告链接地址</th><th>广告添加时间</th><th>广告结束时间</th><th>是否过期</th><th>广告图片</th><th>操作</th></tr>
			<?php $_from = $this->_tpl_vars['advData']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['v']):
?>
			<tr>
				<td><img src='../Public/Images/off.gif' /></td>
				<td><?php echo $this->_tpl_vars['v']['adv_id']; ?>
</td>
				<td>
					<?php if ($this->_tpl_vars['v']['adv_position'] == 0): ?>
						上
					<?php elseif ($this->_tpl_vars['v']['adv_position'] == 1): ?>
						中
					<?php else: ?>
						下
					<?php endif; ?>
				</td>
				<td><?php echo $this->_tpl_vars['v']['adv_name']; ?>
</td>
				<td><?php echo $this->_tpl_vars['v']['adv_link']; ?>
</td>
				<td><?php echo ((is_array($_tmp="Y-m-d")) ? $this->_run_mod_handler('date', true, $_tmp, $this->_tpl_vars['v']['adv_addtime']) : date($_tmp, $this->_tpl_vars['v']['adv_addtime'])); ?>
</td>
				<td><?php echo ((is_array($_tmp="Y-m-d")) ? $this->_run_mod_handler('date', true, $_tmp, $this->_tpl_vars['v']['adv_endtime']) : date($_tmp, $this->_tpl_vars['v']['adv_endtime'])); ?>
</td>
				<td>
				<?php if ($this->_tpl_vars['v']['timeflag'] == 1): ?>
					<font style="color:red;">过期</font>
				<?php else: ?>
					<font style="color:green;">未过期</font>
				<?php endif; ?>
				</td>
				<td><button onclick="showPic('<?php echo $this->_tpl_vars['v']['adv_pic']; ?>
','advmpic')">查看图片</button></td>
				<td><a href="AdvM.php?flag=advdelete&id=<?php echo $this->_tpl_vars['v']['adv_id']; ?>
">[删除]</a></td>
			</tr>

			<?php endforeach; else: ?>
				<tr><td colspan='10'>暂时关于广告的记录！</td></tr>
			<?php endif; unset($_from); ?>
		</table>
		<div >
			<img id="advmpic" src=""/>
		</div>
	</div>
	
</div>

</body>
</html>